package com.sms.shared;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name="user")
public class User implements Serializable{
	
	public User(){
		
	}
	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "id")
	private java.lang.Long id;
	
	@Column(name = "userName", nullable = true, length = 50)
	private String userName;
	@Column(name = "password", nullable = true, length = 50)
	private String password;
	@Column
	private Boolean isActive;
	@Column(name = "roleName", nullable = true, length = 50)
	private String roleName;

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "partyId", insertable = false, updatable = false)
	private PARTY party;

	public java.lang.Long getId() {
		return id;
	}

	public void setId(java.lang.Long id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public PARTY getParty() {
		return party;
	}

	public void setParty(PARTY party) {
		this.party = party;
	}
	
	
}
